import request from "/@/utils/request";

export function addResident(data: any) {
    console.log(data);
    return request({
        url: '/resident/resident/addResident',
        method: 'post',
        data: data,
    });
}

export function deleteResident(ids: Number[]) {
    return request({
        url: '/resident/resident/deleteResident',
        method: 'delete',
        params: { ids },
    });
}

export function updateResident(data: any) {
    return request({
        url: '/resident/resident/updateResident',
        method: 'put',
        data: data,
    });
}
export function getResidentList(query?: Object) {
    return request({
        url: '/resident/resident/page',
        method: 'get',
        params: query,
    });
}

export function getResidentById(residentId: Number) {
    return request({
        url: '/resident/resident/getResidentById',
        method: 'get',
        params: { residentId },
    });
}

